package com.test;

import java.util.HashMap;

public class Result extends HashMap<String,Object> {

    private Integer code;
    private String message;

    public Result(){}
    public Result(Integer code,String message){
        this.code=code;
        this.message=message;
    }

    public Result success(){
        this.code = 200;
        this.message= "操作成功";
        return this;
    }


    @Override
    public String toString() {
        return "Result{" +
                "code=" + code +
                ", message='" + message + '\'' +
                '}';
    }
}
